<?php slot('comment','active'); ?>
<div class="row-fluid">	
      <div class="box span12">
              <div class="box-header">
                      <h2>
                        <i class="icon-align-justify"></i><span class="break"></span>
                        评论列表
                      </h2>
                      <div class="box-icon">
<!--                              <a href="#" class="btn-setting"><i class="icon-wrench"></i></a>
                              <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
                              <a href="#" class="btn-close"><i class="icon-remove"></i></a>-->
                      </div>
              </div>
              <div class="box-content">
                <?php if($sf_user->hasFlash('error')): ?>
                <div class="alert alert-error">
                        <button type="button" class="close" data-dismiss="alert">×</button>
                        <strong>错误！</strong>  <?php echo $sf_user->getFlash('error'); ?>
                </div>
                <?php endif; ?>
                <?php if($sf_user->hasFlash('success')): ?>
                <div class="alert alert-success">
                        <button type="button" class="close" data-dismiss="alert">×</button>
                        <strong>操作成功！</strong> <?php echo $sf_user->getFlash('success'); ?>
                </div>
                <?php endif; ?>
                <?php if($sf_user->hasFlash('notice')): ?>
                <div class="alert alert-info">
                        <button type="button" class="close" data-dismiss="alert">×</button>
                        <strong><?php echo $sf_user->getFlash('notice'); ?></strong> 
                </div>
                <?php endif; ?>
                <div class="row-fluid">
<!--                  <div class="span6">
                    <div class="dataTables_filter" id="DataTables_Table_0_filter">
                      <form action="<?php // echo url_for('user/index'); ?>" method="post">
                      <label>
                        标题: <input type="text" name="user_name" />  <button class="btn btn-small btn-primary" style="margin-top:-10px;">搜索</button>
                      </label>
                      </form>
                    </div>
                  </div>-->
                  
                </div>
                <form id="delete_all_form" action="<?php echo url_for('user/delete_ids'); ?>" method="post" >
                      <table id="data-list" class="table table-bordered table-striped table-condensed">
                                <thead>
                                        <tr>
                                                <th class="center" style="width:30px;">ID</th>
                                                <th class="center" style="width:40%;">文章标题</th>
                                                <th class="center">作者</th>
                                                <th class="center">评论内容</th>
                                                <th class="center">推荐状态</th>
                                                <th class="center">显示状态</th>
                                                <th class="center">操作</th>                                            
                                        </tr>
                                </thead>
                                <tbody>
                                 <?php foreach($pager->getResults() as $comment): ?>
                                    <tr>
                                        <td><?php echo $comment->getId(); ?></td>
                                        <td><?php echo $comment->getArticle()->getTitle(); ?></td>
                                        <td><a href="<?php echo url_for('user/show?id='.$comment->getUser()->getId()); ?>"><?php echo $comment->getUser()->getNickname(); ?></a></td>
                                        <td>
                                            <a href="<?php echo url_for('comment/show?id='.$comment->getId()); ?>" target="_blank" >点击查看</a>
                                        </td>
                                        <td><?php echo $comment->getIsRecommend(); ?></td>
                                        <td><?php echo $comment->getIsDisplay(); ?></td>
                                        <td><a href="<?php echo url_for('comment/recommend?id='.$comment->getId()); ?>">推荐</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                        <a href="<?php echo url_for('comment/change_comment_display?id='.$comment->getId().'&display='.((int)(!$comment->getDisplay()))); ?>"><?php echo ArticleComment::$status[((int)(!$comment->getDisplay()))]; ?></a>
                                        </td>
                                    </tr>
                                 <?php endforeach; ?>
                                </tbody>
                       </table>  
                  </form>
                <?php echo pager_navigation($pager, 'comment/index'); ?>
              </div>
      </div><!--/span-->
</div>